package com.xiaogao.serviceEdu.controller;

import com.xiaogao.commonUtils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @author 小高
 * @createtime 2021-06-03-17:00
 * @description
 */
@Api(description = "登录管理")
@RestController
@RequestMapping("/serviceEdu/user")
public class EduLoginController {

    // login
    @ApiOperation("登录")
    @PostMapping("/login")
    public Result login(){
        return Result.ok().data("token","admin");
    }

    // info
    @GetMapping("/info")
    @ApiOperation("用户信息")
    public Result info(){
        // 角色，名称，头像
        return Result.ok().data("roles","[admin]").data("name","admin").data("avatar","http://wx3.sinaimg.cn/bmiddle/006GJQvhgy1gqd3rko7mvj30u00u0n50.jpg");
    }
}
